import 'package:aone_common/common.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class UserView extends StatelessWidget {
  const UserView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final userService = UserService.to;
    return Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            userService.onBeforeLogout();
            Get.toNamed(Routes.home, id: 1, preventDuplicates: true);
          }, child: const Text('Log out'),
        ),
      ),

    );
  }
}
